import request from '@/utils/request'

// 获取列表
export function getManufacturers(data) {
  return request({
    url: '/ic/manufacturers/', method: 'get', params: data
  })
}

// 获取详情
export function getManufacturer(id) {
  return request({
    url: `/ic/manufacturers/${id}/`, method: 'get'
  })
}

// 修改
export function updateManufacturer(id, data) {
  return request({
    url: `/ic/manufacturers/${id}/`, method: 'put', data
  })
}

// 新增
export function createManufacturer(data) {
  return request({
    url: '/ic/manufacturers/', method: 'post', data
  })
}

// 删除单个
export function deleteManufacturer(id) {
  return request({
    url: `/ic/manufacturers/${id}/`, method: 'delete'
  })
}

// 批量删除
export function deleteManufacturers(ids) {
  return request({
    url: '/ic/manufacturers/', method: 'delete', data: {'ids': ids}
  })
}
